﻿namespace ProcessBarDemo.UpdateFramework
{
    public static class ThreadCountDecider
    {
        public static int GetThreadCount(long fileSize)
        {
            const long KB = 1024;
            const long MB = 1024 * KB;

            if (fileSize < 1 * MB)
                return 1; 
            else if (fileSize < 10 * MB)
                return 2;
            else if (fileSize < 50 * MB)
                return 4;
            else
                return 6;
        }
    }
}

